﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace SimoBotRewritten
{
    public class AddWholeLineToMySQL
    {
        public void addToDB(string[] parsedMsg)
        {
            string ConnectionString = "SERVER=127.0.0.1;" + "DATABASE=simostatsdb;" + "UID=root;" + "PASSWORD=mongobongo;";
            MySqlConnection connect = new MySqlConnection(ConnectionString);
            MySqlCommand cmd = connect.CreateCommand();
            MySqlDataReader Reader;
            cmd.CommandText = "INSERT INTO simomsg VALUES ('" +
                parsedMsg[0].ToString() + "','" + parsedMsg[1].ToString() +
                    "','" + parsedMsg[2].ToString() + "','" + parsedMsg[3].ToString() +
                    "','" + parsedMsg[4].ToString() + "');";


            connect.Open();
            Reader = cmd.ExecuteReader();

            connect.Close();
        }
    }
}
